package com.gz.moreaseManager.modules.mapper;

import com.gz.moreaseManager.core.modal.QueryMapHelper;
import com.gz.moreaseManager.modules.entity.MenuWeb;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 官网菜单表 Mapper 接口
 * </p>
 *
 * @author wike
 * @since 2019-02-25
 */
public interface MenuWebMapper extends BaseMapper<MenuWeb> {

    /**
     * 查询所有菜单id+auth_code。
     * @return 数据列表
     */
    @Select("select id, auth_code from menu_web")
    @Results({
            @Result(property="key", column="id"),
            @Result(property="value", column="auth_code")
    })
    List<QueryMapHelper<Integer,String>> selectAuthCodeMapList();

}
